Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for converting DLTensor for NPU device type #14878

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kyule7
Copy link
Contributor

@kyule7 kyule7 commented Mar 2, 2023

Description

This PR extends dlpack convertor in onnxruntime to support DLDeviceType::kDLExtDev for NPU device type.

Motivation and Context

ORT InferenceSession (used for ORTModule and DORT) produces results as ortvalue, and convert them to at Tensor through dlpack. Currently, it supports converting tensors for CPU and GPU. This PR adds support for the conversion for NPU ORT device type between DLTensor and ORT tensor for NPU device type. Currently in the PR, tensor conversion through DLPack borrows DLExtDevice, which is planned to use DLOrt once a PR that supports DLOrt is merged.

Related PR in pytorch for the conversion between DLTensor and at Tensor for ORT NPU device type: pytorch/pytorch#95859

@kyule7 kyule7 marked this pull request as ready for review February 22, 2024 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant